package com.zhengxiang.onlinexamination.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zhengxiang.onlinexamination.entity.WaitPaper;
import com.zhengxiang.onlinexamination.entity.vo.WaitPaperVo;

import java.io.IOException;

/**
 * 待考试(WaitPaper)表服务接口
 *
 * @author 
 * @since 2023-03-15 11:44:51
 */
public interface WaitPaperService extends IService<WaitPaper> {

    /**
     * 下发试卷
     * @param wp
     */
    void saveWaitPaper(WaitPaperVo wp) throws IOException;

    /**
     * 待考试列表
     * @param wp
     * @return
     */
    IPage<WaitPaper> queryAll(WaitPaperVo wp);

    /**
     * 更新待考人员
     * @param wp
     */
    void updateWaitState(WaitPaperVo wp);

    /**
     * 试卷详情
     * @param wp
     * @return
     */
    WaitPaperVo queryPaperInfo(WaitPaperVo wp);

    /**
     * 待考状态
     * @param userId
     * @param waitPaperId
     * @return true 存在  false 不存在
     */
    boolean checkWaitPaper(Integer userId,Integer waitPaperId);

    /**
     * 个人待考记录
     * */
    IPage queryWaitPaperByUser(Page page);
}
